3.14.16 \(\int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx\) [1316]

3.14.16.1 Optimal result
3.14.16.2 Mathematica [A] (verified)
3.14.16.3 Rubi [A] (verified)
3.14.16.4 Maple [A] (verified)
3.14.16.5 Fricas [A] (verification not implemented)
3.14.16.6 Sympy [F(-1)]
3.14.16.7 Maxima [A] (verification not implemented)
3.14.16.8 Giac [A] (verification not implemented)
3.14.16.9 Mupad [B] (verification not implemented)

3.14.16.1 Optimal result

Integrand size = 27, antiderivative size = 120 \[ \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\left (2 a^2-b^2\right ) \csc (c+d x)}{a^3 d}+\frac {b \csc ^2(c+d x)}{2 a^2 d}-\frac {\csc ^3(c+d x)}{3 a d}+\frac {b \left (2 a^2-b^2\right ) \log (\sin (c+d x))}{a^4 d}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^4 b d} \]

output
(2*a^2-b^2)*csc(d*x+c)/a^3/d+1/2*b*csc(d*x+c)^2/a^2/d-1/3*csc(d*x+c)^3/a/d 
+b*(2*a^2-b^2)*ln(sin(d*x+c))/a^4/d+(a^2-b^2)^2*ln(a+b*sin(d*x+c))/a^4/b/d
 
3.14.16.2 Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.92 \[ \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {6 a b \left (2 a^2-b^2\right ) \csc (c+d x)+3 a^2 b^2 \csc ^2(c+d x)-2 a^3 b \csc ^3(c+d x)-6 b^2 \left (-2 a^2+b^2\right ) \log (\sin (c+d x))+6 \left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{6 a^4 b d} \]

input
Integrate[(Cos[c + d*x]*Cot[c + d*x]^4)/(a + b*Sin[c + d*x]),x]
 
output
(6*a*b*(2*a^2 - b^2)*Csc[c + d*x] + 3*a^2*b^2*Csc[c + d*x]^2 - 2*a^3*b*Csc 
[c + d*x]^3 - 6*b^2*(-2*a^2 + b^2)*Log[Sin[c + d*x]] + 6*(a^2 - b^2)^2*Log 
[a + b*Sin[c + d*x]])/(6*a^4*b*d)
 
3.14.16.3 Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.98, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3316, 27, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^5}{\sin (c+d x)^4 (a+b \sin (c+d x))}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \frac {\csc ^4(c+d x) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{a+b \sin (c+d x)}d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {\csc ^4(c+d x) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b^4 (a+b \sin (c+d x))}d(b \sin (c+d x))}{b d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {\int \left (\frac {\csc ^4(c+d x)}{a}-\frac {b \csc ^3(c+d x)}{a^2}+\frac {\left (b^4-2 a^2 b^2\right ) \csc ^2(c+d x)}{a^3 b^2}+\frac {\left (2 a^2 b^2-b^4\right ) \csc (c+d x)}{a^4 b}+\frac {\left (a^2-b^2\right )^2}{a^4 (a+b \sin (c+d x))}\right )d(b \sin (c+d x))}{b d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {b^2 \csc ^2(c+d x)}{2 a^2}+\frac {b^2 \left (2 a^2-b^2\right ) \log (b \sin (c+d x))}{a^4}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^4}+\frac {b \left (2 a^2-b^2\right ) \csc (c+d x)}{a^3}-\frac {b \csc ^3(c+d x)}{3 a}}{b d}\)

input
Int[(Cos[c + d*x]*Cot[c + d*x]^4)/(a + b*Sin[c + d*x]),x]
 
output
((b*(2*a^2 - b^2)*Csc[c + d*x])/a^3 + (b^2*Csc[c + d*x]^2)/(2*a^2) - (b*Cs 
c[c + d*x]^3)/(3*a) + (b^2*(2*a^2 - b^2)*Log[b*Sin[c + d*x]])/a^4 + ((a^2 
- b^2)^2*Log[a + b*Sin[c + d*x]])/a^4)/(b*d)
 

3.14.16.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
3.14.16.4 Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.92

method result size
derivativedivides \(\frac {\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{4} b}-\frac {1}{3 a \sin \left (d x +c \right )^{3}}-\frac {-2 a^{2}+b^{2}}{a^{3} \sin \left (d x +c \right )}+\frac {\left (2 a^{2}-b^{2}\right ) b \ln \left (\sin \left (d x +c \right )\right )}{a^{4}}+\frac {b}{2 a^{2} \sin \left (d x +c \right )^{2}}}{d}\) \(111\)
default \(\frac {\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{4} b}-\frac {1}{3 a \sin \left (d x +c \right )^{3}}-\frac {-2 a^{2}+b^{2}}{a^{3} \sin \left (d x +c \right )}+\frac {\left (2 a^{2}-b^{2}\right ) b \ln \left (\sin \left (d x +c \right )\right )}{a^{4}}+\frac {b}{2 a^{2} \sin \left (d x +c \right )^{2}}}{d}\) \(111\)
parallelrisch \(\frac {24 \left (a -b \right )^{2} \left (a +b \right )^{2} \ln \left (2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )-24 \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{4}-b \left (\left (-48 a^{2} b +24 b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (a^{2} \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 a b \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-21 a^{2}+12 b^{2}\right ) \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-21 a^{2}+12 b^{2}\right )\right ) a \right )}{24 a^{4} b d}\) \(201\)
norman \(\frac {-\frac {1}{24 a d}-\frac {\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )}{24 d a}+\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a^{2} d}+\frac {b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a^{2} d}+\frac {\left (5 a^{2}-3 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a^{3} d}+\frac {\left (5 a^{2}-3 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a^{3} d}+\frac {\left (7 a^{2}-4 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a^{3} d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {b \left (2 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{4} d}+\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{a^{4} b d}-\frac {\ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b d}\) \(289\)
risch \(-\frac {i x}{b}-\frac {2 i c}{b d}+\frac {2 i \left (6 a^{2} {\mathrm e}^{5 i \left (d x +c \right )}-3 b^{2} {\mathrm e}^{5 i \left (d x +c \right )}-8 a^{2} {\mathrm e}^{3 i \left (d x +c \right )}+6 b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+3 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}+6 a^{2} {\mathrm e}^{i \left (d x +c \right )}-3 b^{2} {\mathrm e}^{i \left (d x +c \right )}-3 i a b \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{b d}-\frac {2 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a^{2} d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a^{4} d}+\frac {2 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}-\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{4} d}\) \(308\)

input
int(cos(d*x+c)^5*csc(d*x+c)^4/(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
 
output
1/d*((a^4-2*a^2*b^2+b^4)/a^4/b*ln(a+b*sin(d*x+c))-1/3/a/sin(d*x+c)^3-(-2*a 
^2+b^2)/a^3/sin(d*x+c)+(2*a^2-b^2)/a^4*b*ln(sin(d*x+c))+1/2/a^2*b/sin(d*x+ 
c)^2)
 
3.14.16.5 Fricas [A] (verification not implemented)

Time = 0.49 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.65 \[ \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {3 \, a^{2} b^{2} \sin \left (d x + c\right ) + 10 \, a^{3} b - 6 \, a b^{3} - 6 \, {\left (2 \, a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) \sin \left (d x + c\right ) + 6 \, {\left (2 \, a^{2} b^{2} - b^{4} - {\left (2 \, a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right )}{6 \, {\left (a^{4} b d \cos \left (d x + c\right )^{2} - a^{4} b d\right )} \sin \left (d x + c\right )} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^4/(a+b*sin(d*x+c)),x, algorithm="fricas" 
)
 
output
-1/6*(3*a^2*b^2*sin(d*x + c) + 10*a^3*b - 6*a*b^3 - 6*(2*a^3*b - a*b^3)*co 
s(d*x + c)^2 + 6*(a^4 - 2*a^2*b^2 + b^4 - (a^4 - 2*a^2*b^2 + b^4)*cos(d*x 
+ c)^2)*log(b*sin(d*x + c) + a)*sin(d*x + c) + 6*(2*a^2*b^2 - b^4 - (2*a^2 
*b^2 - b^4)*cos(d*x + c)^2)*log(1/2*sin(d*x + c))*sin(d*x + c))/((a^4*b*d* 
cos(d*x + c)^2 - a^4*b*d)*sin(d*x + c))
 
3.14.16.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Timed out} \]

input
integrate(cos(d*x+c)**5*csc(d*x+c)**4/(a+b*sin(d*x+c)),x)
 
output
Timed out
 
3.14.16.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.94 \[ \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {6 \, {\left (2 \, a^{2} b - b^{3}\right )} \log \left (\sin \left (d x + c\right )\right )}{a^{4}} + \frac {6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{4} b} + \frac {3 \, a b \sin \left (d x + c\right ) + 6 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} - 2 \, a^{2}}{a^{3} \sin \left (d x + c\right )^{3}}}{6 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^4/(a+b*sin(d*x+c)),x, algorithm="maxima" 
)
 
output
1/6*(6*(2*a^2*b - b^3)*log(sin(d*x + c))/a^4 + 6*(a^4 - 2*a^2*b^2 + b^4)*l 
og(b*sin(d*x + c) + a)/(a^4*b) + (3*a*b*sin(d*x + c) + 6*(2*a^2 - b^2)*sin 
(d*x + c)^2 - 2*a^2)/(a^3*sin(d*x + c)^3))/d
 
3.14.16.8 Giac [A] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.26 \[ \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {6 \, {\left (2 \, a^{2} b - b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{4}} + \frac {6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{4} b} - \frac {22 \, a^{2} b \sin \left (d x + c\right )^{3} - 11 \, b^{3} \sin \left (d x + c\right )^{3} - 12 \, a^{3} \sin \left (d x + c\right )^{2} + 6 \, a b^{2} \sin \left (d x + c\right )^{2} - 3 \, a^{2} b \sin \left (d x + c\right ) + 2 \, a^{3}}{a^{4} \sin \left (d x + c\right )^{3}}}{6 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^4/(a+b*sin(d*x+c)),x, algorithm="giac")
 
output
1/6*(6*(2*a^2*b - b^3)*log(abs(sin(d*x + c)))/a^4 + 6*(a^4 - 2*a^2*b^2 + b 
^4)*log(abs(b*sin(d*x + c) + a))/(a^4*b) - (22*a^2*b*sin(d*x + c)^3 - 11*b 
^3*sin(d*x + c)^3 - 12*a^3*sin(d*x + c)^2 + 6*a*b^2*sin(d*x + c)^2 - 3*a^2 
*b*sin(d*x + c) + 2*a^3)/(a^4*sin(d*x + c)^3))/d
 
3.14.16.9 Mupad [B] (verification not implemented)

Time = 11.78 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.89 \[ \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {7}{8\,a}-\frac {b^2}{2\,a^3}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,a\,d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{b\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (2\,a^2\,b-b^3\right )}{a^4\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (7\,a^2-4\,b^2\right )-\frac {a^2}{3}+a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,a^3\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}+\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,{\left (a^2-b^2\right )}^2}{a^4\,b\,d} \]

input
int(cos(c + d*x)^5/(sin(c + d*x)^4*(a + b*sin(c + d*x))),x)
 
output
(tan(c/2 + (d*x)/2)*(7/(8*a) - b^2/(2*a^3)))/d - tan(c/2 + (d*x)/2)^3/(24* 
a*d) - log(tan(c/2 + (d*x)/2)^2 + 1)/(b*d) + (log(tan(c/2 + (d*x)/2))*(2*a 
^2*b - b^3))/(a^4*d) + (b*tan(c/2 + (d*x)/2)^2)/(8*a^2*d) + (tan(c/2 + (d* 
x)/2)^2*(7*a^2 - 4*b^2) - a^2/3 + a*b*tan(c/2 + (d*x)/2))/(8*a^3*d*tan(c/2 
 + (d*x)/2)^3) + (log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(c/2 + (d*x)/2)^2) 
*(a^2 - b^2)^2)/(a^4*b*d)